package q.yazg;

/**
 *
 * @author khalisq
 */
public class FollowMessage implements Message{

    private enum Type{
        set,update;
    }
    
    private Followable data;
    private Type type;

    private FollowMessage(Followable data, Type type) {
        this.data = data;
        this.type = type;
    }
    
    public static FollowMessage setInstance(Followable e){
        return new FollowMessage(e,Type.set);
    }
    
    public static FollowMessage updateInstance(Followable f){
        return new FollowMessage(f, Type.update);
    }
    
    public boolean isSet(){
        return type==Type.set;
    }
    
    public boolean isUpdate(){
        return type==Type.update;
    }
        
    public Followable getFollowable(){
        return data;
    }
}
